package factory;

/**
 * @Author: linKe
 * @Date: 2022/1/15 10:25
 * @FileName: CheesePizza
 * @version: 1.0
 * @Description: 芝士披萨实现类
 */
public class CheesePizza extends Pizza{
    /**
     * 原料工厂
     */
    private PizzaIngredientFactory factory;

    public CheesePizza(PizzaIngredientFactory factory) {
        this.factory = factory;
    }

    public CheesePizza() {
        name = "cheese pizza";
        cheese = factory.getCheese();
    }
}
